﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace End_term
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var Title = textBox1.Text;
            var Articles = textBox2.Text;
            var id = textBox3.Text;
            var insert = string.Format("update Articles set Title='{0}',Author='{1}' where Id={2}", Title, Articles, id);
            Dbhelp.GetDataTable(insert);
            MessageBox.Show("更新成功");
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
